namespace CSharpPro._9._25

{
    
    public class Demo
    {
        //作业1
        public bool IsLeapYear(int year)
        {
            bool flag = false;
            if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
            {
                flag = true;
            }

            return flag;
        }

        //作业2
        public double Month(int months, int method)
        {
            double price = 8800;
            if (months >= 5 && months <= 10)
            {
                if (method == 1)//航班出行
                {
                    price = price * 0.9;
                }

                if (method == 2)//动车出行1
                {
                    price = price * 0.75;
                }
            }
            else if (months < 5 && months > 10)
            {
                if (method == 1)
                {
                    price = price * 0.6;
                }

                if (method == 2)
                {
                    price = price * 0.3;
                }
            }
            return price;
        }
    }
}